package com.zh.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zh.system.domain.dto.PageMessageDto;
import com.zh.system.domain.entity.SysMsgFrom;
import com.zh.system.domain.vo.MessageVo;
import org.mapstruct.Mapper;

import java.util.List;

@Mapper
public interface SysMsgFromMapper extends BaseMapper<SysMsgFrom> {

    void updateReceiveCount(Long msgId);

    List<SysMsgFrom> page(Page<SysMsgFrom> page, PageMessageDto pageMessageDto);

    List<MessageVo> list(Long userId, String type);

    Integer countUnConfirmed(Long userId, String type);

    Integer updateReceiveCountBatch(List<Long> msgIdList);
}
